package com.rmi.hello;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by buguniao on 15/12/9.
 */
public class SpringClientImpl {
    public static void main(String[] args) throws Exception{
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:**/rmiclient.xml");
        com.rmi.hello.HelloRemote helloService=(com.rmi.hello.HelloRemote)context.getBean("helloService");

        com.rmi.hello.User user = new User();
        user.setName("我的名字叫牛逼");
        String rs = helloService.sayHello(user);
        System.out.println(rs);
    }
}
